package com.yuan.java注解自定义;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;



/*
 *  @author 雨安
 *  类名： LogAopAction
 *  创建时间：2024/5/20
 */
@Component
@Aspect
@Slf4j
public class LogAopAction {

//    @Before("@annotation(SysLog)")
//    public void logMethodExecution(JoinPoint joinpoin){
//        log.info("我是测试");
//    }

    @Before("@annotation(sysLog)")
    public void logMethodExecution(JoinPoint joinPoint, SysLog sysLog) {
        String value = sysLog.doName();
        System.out.println("Value of SysLog annotation: " + value);
    }
}
